import request from '@/utils/request.js'
//获取token
export const goLogin = params => request.post('sys/mall/visitorLogin', params )

// 邀请成为子账号
export const inviteChildAccount = params => request.post(`api/mall/relateSonMallMember`,params)

// 获取会员信息
export const getMemberInfo = params => request.post(`sys/mall/getMallMemberByMemberId`,params)

// 解除绑定子账号
export const unbindChildAccount = params => request.post(`api/mall/cancelSonBinding`,params);
// openid换绑
export const changeBinding = params => request.post(`api/mall/changeBinding`,params)

//获取微信oppid sys/mall/getWechatOpenId
export const getWechatOpenId = params => request.post('sys/mall/getWechatOpenId', params )

//获取当前用户信息 api/mall/getCurrentMallMember
export const getCurrentMallMember = params => request.post('api/mall/getCurrentMallMember', params )

//获取验证码 platform/bussiness/sendVerificationCode
export const sendVerificationCode = params => request.post('platform/bussiness/sendVerificationCode', params )

//手机号密码登录 sys/mall/login
export const login = params => request.post('sys/mall/login', params )

//根据key获取设置 api/mall/getMallParameterByKey
export const getMallParameterByKey = params => request.post('api/mall/getMallParameterByKey', params )

//获取小数位数设置 api/mall/getMallBillParameterDecimals
export const getMallBillParameterDecimals = params => request.post('api/mall/getMallBillParameterDecimals', params )

//获取商城系统参数 api/mall/listMallParameter
export const listMallParameter = params => request.post('api/mall/listMallParameter', params )

//获取品牌列表 api/mall/listMallCommodityBrandPageInfo
export const listMallCommodityBrandPageInfo = params => request.post('api/mall/listMallCommodityBrandPageInfo', params )

//获取活动列表 api/mall/listMallCommodityActivityPageInfo
export const listMallCommodityActivityPageInfo = params => request.post('api/mall/listMallCommodityActivityPageInfo', params )

//根据活动id获取商品列表 api/mall/listMallCommodityActivityCommodityPageInfo
export const listMallCommodityActivityCommodityPageInfo = params => request.post('api/mall/listMallCommodityActivityCommodityPageInfo', params )

//获取商品列表 api/mall/listMobileCommodityPageInfo
export const listMobileCommodityPageInfo = params => request.post('api/mall/listMobileCommodityPageInfo', params )

//获取收藏列表 api/mall/listMallCommodityInfoCollectPageInfo
export const listMallCommodityInfoCollectPageInfo = params => request.post('api/mall/listMallCommodityInfoCollectPageInfo', params )

//添加、取消收藏 api/mall/addOrCancelMallCommodityInfoCollect
export const addOrCancelMallCommodityInfoCollect = params => request.post('api/mall/addOrCancelMallCommodityInfoCollect', params )

//根据id 获取商品详情 api/mall/getMallCommodityInfo
export const getMallCommodityInfo = params => request.post('api/mall/getMallCommodityInfo', params )

//获取分类仓库列表 api/mall/listMallWarehouseInfoPageInfo
export const listMallWarehouseInfoPageInfo = params => request.post('api/mall/listMallWarehouseInfoPageInfo', params )
export const registerApi = params => request.post(`sys/mall/register`,params)
//获取商品类别筛选树 数据列表 api/mall/listMallCommodityClassifyZtree
export const listMallCommodityClassifyZtree = params => request.post('api/mall/listMallCommodityClassifyZtree', params )

//添加到购物车 api/mall/addMallShoppingCart
export const addMallShoppingCart = params => request.post('api/mall/addMallShoppingCart', params )

//获取购物车列表 api/mall/listMallShoppingCartPageInfo
export const listMallShoppingCartPageInfo = params => request.post('api/mall/listMallShoppingCartPageInfo', params )

//修改购物车数量 api/mall/updateMallShoppingCartCommodityQty
export const updateMallShoppingCartCommodityQty = params => request.post('api/mall/updateMallShoppingCartCommodityQty', params )

//删除购物车 api/mall/delMallShoppingCartCommodity
export const delMallShoppingCartCommodity = params => request.post('api/mall/delMallShoppingCartCommodity', params )

//商城下单 api/mall/addMallOrder
export const addMallOrder = params => request.post('api/mall/addMallOrder', params )

//获取订单列表 api/mall/listMallOrderPageInfo
export const listMallOrderPageInfo = params => request.post('api/mall/listMallOrderPageInfo', params )

//新建子账号 api/mall/addSubMallMemberInfo
export const addSubMallMemberInfo = params => request.post('api/mall/addSubMallMemberInfo', params )

//获取子账号列表 api/mall/listMallMemberSonPageInfo
export const listMallMemberSonPageInfo = params => request.post('api/mall/listMallMemberSonPageInfo', params )

//删除子账号 api/mall/deleteMallMemberById
export const deleteMallMemberById = params => request.post('api/mall/deleteMallMemberById', params )

//订单状态修改 api/mall/updateMallOrderStatus
export const updateMallOrderStatus = params => request.post('api/mall/updateMallOrderStatus', params )

//删除订单 api/mall/deleteMallOrderByOrderId
export const deleteMallOrderByOrderId = params => request.post('api/mall/deleteMallOrderByOrderId', params )

//退货提交 api/mall/addMallOrderReturn
export const addMallOrderReturn = params => request.post('api/mall/addMallOrderReturn', params )

// 获取退货单列表 api/mall/listMallOrderReturnPageInfo
export const listMallOrderReturnPageInfo = params => request.post('api/mall/listMallOrderReturnPageInfo', params )

//取消申请退货单 api/mall/closeMallOrderReturn
export const closeMallOrderReturn = params => request.post('api/mall/closeMallOrderReturn', params )

//立即寄件 api/mall/sendCommoditiesImmediately
export const sendCommoditiesImmediately = params => request.post('api/mall/sendCommoditiesImmediately', params )

//生成支付记录 api/mall/createMallOrderMoney
export const createMallOrderMoney = params => request.post('api/mall/createMallOrderMoney', params )

//支付下单 sys/aggregatePay/wxPreCreate
export const wxPreCreate = params => request.post('sys/aggregatePay/wxPreCreate', params )
//通联下单 sys/unitorder/mallAppletPay
export const tonglianPreCerate = params => request.post('sys/unitorder/mallAppletPay', params )
//微信下单 sys/wxpay/weChatAppletPay
export const weixinPreCreate = params => request.post('sys/wxpay/weChatAppletPay', params )
//线下支付接口 api/mall/mallOfflinePayment
export const mallOfflinePayment = params => request.post('api/mall/mallOfflinePayment', params )

//获取消息通知列表 api/mall/listMallBussinessMessageMap
export const listMallBussinessMessageMap = params => request.post('api/mall/listMallBussinessMessageMap', params )

//批量标记消息已读 api/mall/batchMallBussinessMessageLog
export const batchMallBussinessMessageLog = params => request.post('api/mall/batchMallBussinessMessageLog', params )

export const orderAreaCount = params => request.post(`api/mall/getMallOrderQty`,params)
//删除已读消息 api/mall/deleteMallBussinessMessage
export const deleteMallBussinessMessage = params => request.post('api/mall/deleteMallBussinessMessage', params )

//获取往来对账 api/mall/listMallTransactionReconciliation
export const listMallTransactionReconciliation = params => request.post('api/mall/listMallTransactionReconciliation', params )

//获取微信js-sdk 鉴权 api/wechat/getTicket
export const getWxSdkTicket = params => request.post('sys/mall/getWxSdkTicket', params )

//获取消息未读数量 api/mall/getMallMessageUnreadQty
export const getMallMessageUnreadQty = params => request.post('api/mall/getMallMessageUnreadQty', params )

//查询快递公司列表 api/mall/listMallLogistcsPageInfo
export const listMallLogistcsPageInfo = params => request.post('api/mall/listMallLogistcsPageInfo', params )

//获取退货物流信息 api/mall/getReturnLogisticsInfo
export const getReturnLogisticsInfo = params => request.post('api/mall/getReturnLogisticsInfo', params )

//获取收货物流信息 api/mall/getOrderLogisticsInfo
export const getOrderLogisticsInfo = params => request.post('api/mall/getOrderLogisticsInfo', params )

//关于我们 sys/mall/getMallSoftwareEdition
export const getMallSoftwareEdition = params => request.post('sys/mall/getMallSoftwareEdition', params )

//获取商品详情二维码链接 api/mall/getWxQRCode
export const getWxQRCode = params => request.post('api/mall/getWxQRCode', params )

//获取商品在购物车数量 api/mall/getMallShoppingCarQty
export const getCatCount = params => request.post('api/mall/getMallShoppingCarQty', params )
// 获取在线支付信息  api/mall/getMallPayParameter
export const getpaymentDetails = params => request.post('api/mall/getMallPayParameter', params )    
  // 获取优惠券信息  api/mall/listMallCouponActivityApi
  export const getCouponActivity = params => request.post('api/mall/listMallCouponActivityApi', params )  
   // 获取优惠券信息 api/mall/listMallCouponPageInfo
   export const getMyCouponList = params => request.post('api/mall/listMallCouponPageInfo', params )
